Companion

Functions

Link copied to clipboard
inline fun <R> catch(f: () -> R): Outcome<Throwable, R>

Catches any exceptions thrown by the function and lifts the result into an Outcome. If your function returns an option use catchOption instead

Link copied to clipboard
inline fun <R> catchOption(f: () -> Option<R>): Outcome<Throwable, R>

Catches any exceptions thrown by the function and lifts the result into an Outcome. The Optional value will be preserved as Present or Absent accordingly.